<?php
namespace API\Controller;
use Think\Controller;
class ManagesortController extends CommonController {
	//载入一级商品分类信息 
	// true表示载入成功 false失败
	//标识码 0表示失败 1表示成功
	public function loadsort(){
		$Sort = M('Sort');
		$Sortdata = $Sort->order("id ASC")->select();
		if (empty($Sortdata)) {
		             $this->response("载入一级商品分类信息",false,0,"一级商品分类信息为空");	
		}else{
			$Sortdatalist = array();

			foreach ($Sortdata as $value) {
				$value['sortimgurl'] = json_decode($value['sortimgurl'],true);
				$value['sortimgurl'] = $value['sortimgurl'][0];
				$Sortdatalist[ ] = $value;
			}
			$this->response("载入一级商品分类信息",true,1,$Sortdatalist);
		}
	}
	
}